package com.ruoyi.counter.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.counter.mapper.SigninMapper;
import com.ruoyi.counter.domain.Signin;
import com.ruoyi.counter.service.ISigninService;

/**
 * 登录记录Service业务层处理
 *
 * @author xll
 * @date 2021-08-02
 */
@Service
public class SigninServiceImpl implements ISigninService
{
    @Autowired
    private SigninMapper signinMapper;

    /**
     * 查询登录记录
     *
     * @param id 登录记录ID
     * @return 登录记录
     */
    @Override
    public Signin selectSigninById(Long id)
    {
        return signinMapper.selectSigninById(id);
    }

    /**
     * 查询登录记录列表
     *
     * @param signin 登录记录
     * @return 登录记录
     */
    @Override
    @DataScope(deptAlias = "s")
    public List<Signin> selectSigninList(Signin signin)
    {
        return signinMapper.selectSigninList(signin);
    }

    /**
     * 新增登录记录
     *
     * @param signin 登录记录
     * @return 结果
     */
    @Override
    public int insertSignin(Signin signin)
    {
        return signinMapper.insertSignin(signin);
    }

    /**
     * 修改登录记录
     *
     * @param signin 登录记录
     * @return 结果
     */
    @Override
    public int updateSignin(Signin signin)
    {
        return signinMapper.updateSignin(signin);
    }

    /**
     * 批量删除登录记录
     *
     * @param ids 需要删除的登录记录ID
     * @return 结果
     */
    @Override
    public int deleteSigninByIds(Long[] ids)
    {
        return signinMapper.deleteSigninByIds(ids);
    }

    /**
     * 删除登录记录信息
     *
     * @param id 登录记录ID
     * @return 结果
     */
    @Override
    public int deleteSigninById(Long id)
    {
        return signinMapper.deleteSigninById(id);
    }
}
